<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>类式组件</title>
</head>
<body>
<div id="app"></div>
<script src="../lib/babel.min.js"></script>
<script src="../lib/react.development.js"></script>
<script src="../lib/react-dom.development.js"></script>
<script type="text/babel">
  // 创建类式组件, 必须继承React.Component
  class MyCompo extends React.Component {
    // 必须要有render函数，返回vDom
    render() {
      return (
        <h2>我是类定义的组件</h2>
      )
    }
  }
  ReactDOM.render(<MyCompo/>, document.getElementById('app'))
</script>
</body>
</html>
